home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak Vol E-14
/
Vol E-14.iso
/
games
/
reelgold.swf
/
scripts
/
frame_3
/
DoAction.as
Wrap
Text File
|
2014-03-11
|
1KB
|
58 lines
function atan(mx, my, cx, cy)
{
dx = mx - cx;
dy = my - cy;
at = Math.atan(dy / dx) * 180 / 3.141592653589793;
if(dx >= 0)
{
if(dy >= 0)
{
angle = at;
}
else
{
angle = at + 360;
}
}
if(dx < 0)
{
if(dy > 0)
{
angle = at + 180;
}
else
{
angle = at + 180;
}
}
return angle;
}
function fAddGold(who)
{
pGold.push(who);
}
function fAddRock(who)
{
pRocks.push(who);
}
function fSetLevel()
{
pLevelText = "level " + pLevel;
}
getURL("FSCommand:allowscale",false);
getURL("FSCommand:allowscale",false);
pSlideAdd = 0;
pScoreText = "";
score = 0;
pGold = [];
pRocks = [];
_global.fGetDistance = function(a, b)
{
var _loc1_ = b;
var _loc2_ = a;
return Math.sqrt((_loc2_.x - _loc1_.x) * (_loc2_.x - _loc1_.x) + (_loc2_.y - _loc1_.y) * (_loc2_.y - _loc1_.y));
};
pLevel = 1;
pLevelText = "";
fSetLevel();